open(BUFF,"/data2/bsi/RandD/bora/tcga_genotyping/ANNOT/GenomeWideSNP_6.na30.annot.csv") or die "no file found\n";
while(<BUFF>)
{
	chomp($_);
	if($_ !~ m/#/)
	{
		$_ =~ s/"//g;
		#print $_."\n";
		@array = split(',',$_);
		#print "$array[0]\t$array[1]\n";
		$hash{$array[0]} = $array[1];
	}
}
open(BUFF,"cll2.tped") or die  "no file found tped\n";
#open(WRBUFF,">cll2_modified.tped") or die  "no file found tped\n";
while(<BUFF>)
{
        chomp($_);
	@array = split(" ",$_);
	if(exists($hash{$array[1]}))
	{
		$array[1] = $hash{$array[1]};
		$line = join(" ",@array);
		print "$line\n";
		#print WRBUFF $line;
	}
	else
	{
		die "$array[1]\n";
	}
}
